const state = {
    viewer:null,
    id:null,
    timeLayer:null,
    map:null,
    tableData:[],
    tempTableData:[]
}
const mutations = {
    INITEARCHVIEWER:(state,viewerVal)=>{
        state.viewer = viewerVal
    },
    INITIDPROJECT:(state,idVal)=>{
        state.id = idVal
    },
    CHANGETIMELAYER:(state,timeLayerVal)=>{
        state.timeLayer = timeLayerVal
    },
    INITMAP:(state,mapVal)=>{
        state.map = mapVal
    },
    INITTABLEDATA:(state,tableVal)=>{
        state.tableData = tableVal
    },
    INITTEMPTABLEDATA:(state,tableVal)=>{
        state.tempTableData.push(tableVal)
    }
}
const actions = {
    initearchviewer({commit},viewerVal){
        commit("INITEARCHVIEWER",viewerVal)
    },
    initidproject({commit},idVal){
        commit('INITIDPROJECT',idVal)
    },
    changetimelayer({commit},timelayerVal){
        commit('CHANGETIMELAYER',timelayerVal)
    },
    initmap({commit},mapVal){
        commit('INITMAP',mapVal)
    },
    inittabledata({commit},tableVal){
        commit('INITTABLEDATA',tableVal)
    },
    inittemaptabledata({commit},tableVal){
        commit('INITTEMPTABLEDATA',tableVal)
    }
}
export default {
    namespaced: true,
    state,
    mutations,
    actions
}
